package com.fanshuai;

import com.fanshuai.config.AppConfig;
import com.fanshuai.event.EventSender;
import com.fanshuai.resource.ResourceDemo;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {

    public static void main(String[] args) throws Exception {
        ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);

        ResourceDemo demo = context.getBean(ResourceDemo.class);
        demo.testResourceLoader();

        EventSender eventSender = context.getBean(EventSender.class);
        eventSender.sendEvent();
    }
}
